package com.common.retrofit.methods;

import com.common.bean.MoneyCarBean;
import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;
import com.common.utils.SortUtils;

import rx.Observable;
import rx.Subscriber;

public class GetMoneyMethods extends BaseMethods {

    private static GetMoneyMethods m_ins = null;

    public static GetMoneyMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetMoneyMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetMoneyMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Api/User/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void     orderinfo(Subscriber<MoneyCarBean> subscriber,
                      int uid,
                      String hashid,String id ) {
        Observable observable = initService().accoutinfo(System.currentTimeMillis()+"",
                SortUtils.getMyHash("uid","hashid","id"), Constans.ANDROID_APP_ID,"3",uid,hashid ,id
        );
        toSubscribe(observable, subscriber);
    }
}
